import Vue from 'vue'
import Vuex from 'vuex'
import services from '@/services/services.js'
Vue.use(Vuex)
const store = new Vuex.Store({
  state: {
    dictdata: [], // 字典
    title: 'fifth'
  },
  actions: {
    setTitleName ({commit, state}, name) {
      commit('setTitle', name)
    }
  },
  mutations: {
    setTitle (state, name) {
      state.title = name
    }
  },
  getters: {
    dictdata: state => state.dictdata,
    getTitle (state) {
      return state.title
    }
  },
  modules: {

  }
})
export default store
